﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dis.sys.hw1.Service
{
    public class ServiceLog
    {
        public Type ServiceType { get; set; }
        public bool IsDebug { get; set; }

        public ServiceLog(Type serviceType = null, bool isDebug = true)
        {
            ServiceType = serviceType;
            IsDebug = isDebug;
        }

        public void Info(string msg)
        {
            Console.WriteLine(DateTime.Now + " - [INFO] - " + msg);
        }

        public void Debug(string msg)
        {
            if (IsDebug)
            {
                Console.WriteLine(DateTime.Now + " - [DEBUG] - " + msg);
            }
        }

        public void Error(string msg)
        {
            Console.WriteLine(DateTime.Now + " - [ERROR] - " + msg);
        }
    }
}
